import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);//vue的插件机制

const store = new Vuex.Store({
	state:{//存放状态
		token: uni.getStorageSync('Authorization'),
	},
	mutations: {
		setToken(state,token) {
			console.log(token)
			state.token = token;
			uni.setStorageSync('Authorization', token);
		}
	}
})
export default store